package com.itcat.service.impl;

import com.itcat.api.mysql.UmsResourceCategoryApi;
import com.itcat.mysql.pojo.UmsResourceCategory;
import com.itcat.service.UmsResourceCategoryService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * [一句话描述该类的功能]
 *
 * @author : [Cr Mr]
 * @version : [v1.0]
 * @date : [2022/4/3 20:17]
 */
@Service
public class UmsResourceCategoryServiceImpl implements UmsResourceCategoryService {

    @DubboReference
    private UmsResourceCategoryApi UmsResourceCategoryApi;

    /***
     * 查询所有后台资源分类
     * @author Cr Mr
     * @date 2022/4/3 20:19
     */
    @Override
    public List<UmsResourceCategory> listAll() {
        return UmsResourceCategoryApi.listAll();
    }

    /***
     * 添加后台资源分类
     * @author Cr Mr
     * @date 2022/4/4 10:48
     */
    @Override
    public void create(UmsResourceCategory umsResourceCategory) {
        UmsResourceCategoryApi.create(umsResourceCategory);
    }

    /***
     * 修改后台资源分类
     * @author Cr Mr
     * @date 2022/4/4 10:52
     */
    @Override
    public void update(Long id, UmsResourceCategory umsResourceCategory) {
        UmsResourceCategoryApi.update(id, umsResourceCategory);
    }

    /***
     * 根据ID删除后台资源
     * @author Cr Mr
     * @date 2022/4/4 10:52
     */
    @Override
    public void delete(Long id) {
        UmsResourceCategoryApi.delete(id);
    }
}
